jQuery,"undefined"!=typeof acf&&(window.acfe={}),jQuery,"undefined"!=typeof acf&&"undefined"!=typeof acfe&&(acfe.getArray=function(e){return[].concat((e=0===e?"0":e)||[])},acfe.getObject=function(e){return acf.parseArgs(e)},acfe.extractVar=function(e,t,n=null){var a=e[t];return delete e[t],acfe.isUndefined(a)?n:a},acfe.extractVars=function(e,...t){var n,a={};for(n of t){var i=acfe.extractVar(e,n,"!!undefined!!");"!!undefined!!"!==i&&(a[n]=i)}return a},acfe.getEntries=function(e){return Object.entries(e)},acfe.inArray=function(e,t,n=!1){n||(e=acfe.getString(e),t=t.map(function(e){return acfe.getString(e)}));for(var a=0;a.acfe-modal");if(t.length)return t}return!1},acfe.getClosestModal=function(e,t){e=acfe.findClosestModal(e);return!!e.length&&this.getModal(e,t)},acfe.newModal=function(e,t){if(acfe.isJquery(e)){var n=e.data("acf");return n?n.update(t):(n=new acfe.Modal(e,t),acf.doAction("new_modal",n),n)}return t=acf.parseArgs(e,{open:!0}),n=new acfe.Modal(t),acf.doAction("new_modal",n),n},acfe.Modal=acf.Model.extend({data:{modal:"",title:"",content:"",footer:"",class:"",size:"medium",open:!1,destroy:!1,events:{},onOpen:function(){},onClose:function(){}},eventScope:".acfe-modal",events:{changed:"onChanged","click .close":"onClickClose"},onChanged:function(e,t,n,a,i){acfe.inArray(n,["title","content","footer","class","size"])?this.render():"open"===n&&this.checkOpen()},setup:function(e,t){acfe.isJquery(e)||(t=e,e=a('
').appendTo("body")),this.$el=e,t=acfe.getObject(t),this.inherit(e),this.inherit(t),this.renderTemplates(),this.render()},initialize:function(){this.addDataEvents(),this.checkOpen()},addDataEvents:function(){if(this.get("events")){var e,t=this.get("events"),n=/^(\S+)\s*(.*)$/;for(e in t){var a,i=e.match(n),r=(a=i[2]?(o=i[1],i[2]):(o=i[1],""),t[e]),o=o+"."+this.cid;r=this.proxyEvent(this.get(r)),(i=this.$el).on.apply(i,a?[o,a,r]:[o,r])}}},update:function(e){e=acfe.getObject(e);var t,n,a=acfe.extractVar(e,"open");for([t,n]of Object.entries(e))this.set(t,n);return a&&this.set("open",a),this},on:function(){return acf.Model.prototype.on.apply(this,arguments),this},checkOpen:function(){this.get("open")&&this.open()},$wrapper:function(){return this.$("> .acfe-modal-wrapper")},$title:function(e){return acfe.isUndefined(e)?this.$("> .acfe-modal-wrapper > .acfe-modal-title"):this.$("> .acfe-modal-wrapper > .acfe-modal-title > .title").html(e)},$content:function(e){return acfe.isUndefined(e)?this.$("> .acfe-modal-wrapper > .acfe-modal-content"):this.$("> .acfe-modal-wrapper > .acfe-modal-content").html(e)},$footer:function(e){return acfe.isUndefined(e)?this.$("> .acfe-modal-wrapper > .acfe-modal-footer"):this.$("> .acfe-modal-wrapper > .acfe-modal-footer").html(e)},renderTemplates:function(){this.$wrapper().length||this.$el.wrapInner('
'),this.$content().length||this.$wrapper().wrapInner('
')},renderContent:function(){!this.$title().length&&this.get("title")?this.$wrapper().prepend('
'):this.get("title")||this.$title().remove(),!this.$footer().length&&this.get("footer")?this.$wrapper().append(''):this.get("footer")||this.$footer().remove();var e=acfe.isFunction(this.get("title"))?this.get("title").apply(this):this.get("title");this.$title(e),this.get("content")&&(t=acfe.isFunction(this.get("content"))?this.get("content").apply(this):this.get("content"),this.$content(t));var t=acfe.isFunction(this.get("footer"))?this.get("footer").apply(this):'";this.$footer(t)},render:function(){this.renderContent(),this.$el.removeClass("-medium -large -full"),this.get("size")&&this.$el.addClass("-"+this.get("size")),this.get("class")&&this.$el.addClass(this.get("class")),"undefined"!=typeof tinymce&&acf.isset(tinymce,"ui","FloatPanel")&&this.$content().off("scroll.tinymcePanel").on("scroll.tinymcePanel",function(e){tinymce.ui.FloatPanel.hideAll()})},open:function(){this.$el.addClass("-open"),acf.doAction("acfe/modal/open",this),this.get("onOpen").apply(this),this.trigger("open")},close:function(){this.$el.removeAttr("style"),this.$el.removeClass("-open"),acf.doAction("acfe/modal/close",this),this.get("onClose").apply(this),this.trigger("close"),this.set("open",!1),this.get("destroy")&&this.remove()},onClickClose:function(e,t){e.preventDefault(),this.close()}}),acfe.closeModal=function(e){if(acfe.isUndefined(e))return t.closeLastModal();!acfe.isJquery(e)||(e=acfe.getModal(e))&&e.close()},t=new acf.Model({actions:{"acfe/modal/open":"onOpen","acfe/modal/close":"onClose"},events:{"click .acfe-modal-overlay":"onClick",keydown:"onKeydown"},getModals:function(){return acfe.getModals({open:!0})},onOpen:function(e){this.syncModals();var t=a("body");t.hasClass("acfe-modal-opened")||t.addClass("acfe-modal-opened").append(a('
')),acf.getFields({parent:e.$el,visible:!0}).map(function(e){acf.doAction("show_field",e,"group")})},onClose:function(e){this.syncModals(),this.getModals().length||(a(".acfe-modal-overlay").remove(),a("body").removeClass("acfe-modal-opened"))},onClick:function(e){e.preventDefault(),this.closeLastModal()},onKeydown:function(e){27===e.keyCode&&a("body").hasClass("acfe-modal-opened")&&(e.preventDefault(),this.closeLastModal())},closeLastModal:function(){var e=this.getModals();e.length&&e[e.length-1].close()},syncModals:function(){this.getModals().map(function(e,t){return t===this.getModals().length-1?e.$el.removeClass("acfe-modal-sub").css("margin-left",""):void e.$el.addClass("acfe-modal-sub").css("margin-left",-500/(t+1))},this)}}),new acf.Model({events:{"click a[data-modal]":"onClick","click button[data-modal]":"onClick","click input[data-modal]":"onClick"},onClick:function(e,t){e.preventDefault();e=t.data(),t=e.modal?acfe.getModal(e.modal):acfe.getClosestModal(t);t&&(t.update(e),t.open())}}),acfe.Popup=function(e,t){return acfe.deprecatedFunction("acfe.Popup","0.8.8.11","acfe.newModal"),acfe.isJquery(e)?(t=acf.parseArgs(t,{open:!0}),acfe.newModal(e,t)):(t=acf.parseArgs(e,{open:!0}),acfe.newModal(t))})}(jQuery),jQuery,"undefined"!=typeof acf&&"undefined"!=typeof acfe&&(acf.Model.prototype.get=function(e=null,t=null){return null===e?this.data:acfe.arrayGet(this.data,e,t)},acf.Model.prototype.has=function(e){return null!==acfe.arrayGet(this.data,e)},acf.get=function(e=null,t=null){return null===e?this.data:acfe.arrayGet(this.data,e,t)},acf.has=function(e){return null!==acfe.arrayGet(this.data,e)},acf.set=function(e,t){return acfe.arraySet(this.data,e,t),this}),function(n){"undefined"!=typeof acf&&"undefined"!=typeof acfe&&(acfe.getString=function(e){return acfe.isObject(e)?JSON.stringify(e):acfe.isEmpty(e)?"":""+e},acfe.getTextNode=function(e){if(e.exists())for(row of e.contents()){var t=n.trim(n(row).text());if(t)return t}return""},acfe.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.slice(1)})}(jQuery),jQuery,"undefined"!=typeof acf&&"undefined"!=typeof acfe&&new acf.Model({tooltips:{},events:{"click .acfe-field-tooltip":"clickTooltip"},clickTooltip:function(e,t){var n,a=t.attr("title");!a||(n=acf.getClosestField(t))&&(t.attr("title",""),this.tooltips[n.cid]?(this.tooltips[n.cid].hide(),t.attr("title",this.tooltips[n.cid].get("text")),this.tooltips[n.cid]=!1,acfe.versionCompare(acf.get("wp_version"),">=","5.5")&&t.removeClass("dashicons-remove").addClass("dashicons-info-outline")):(this.tooltips[n.cid]=acf.newTooltip({text:a,target:t}),acfe.versionCompare(acf.get("wp_version"),">=","5.5")&&t.removeClass("dashicons-info-outline").addClass("dashicons-remove")))}}),jQuery,"undefined"!=typeof acf&&"undefined"!=typeof acfe&&(acfe.isArray=function(e){return Array.isArray(e)},acfe.isObject=function(e){return"object"==typeof e&&!acfe.isArray(e)},acfe.isNumeric=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},acfe.isString=function(e){return"string"==typeof e},acfe.isUndefined=function(e){return void 0===e},acfe.isFunction=function(e){return"function"==typeof e},acfe.isBool=function(e){return"boolean"==typeof e},acfe.isInt=function(e){return Number.isInteger(e)},acfe.isJquery=function(e){return e instanceof jQuery},acfe.isEmpty=function(e){return acfe.isArray(e)?!e.length:acfe.isObject(e)?e&&0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype:acfe.isString(e)?!e.length:!e&&!acfe.isNumeric(e)}),function(){var i,t,r;"undefined"!=typeof acf&&"undefined"!=typeof acfe&&(acfe.slugify=function(e){return e.replace(/[\s\./]+/g,"-").replace(/[^\p{L}\p{N}_-]+/gu,"").replace(/-+$/,"").toLowerCase()},acfe.addQueryArgs=function(){let e=0{const[n,a=""]=t.split("=").filter(Boolean).map(decodeURIComponent);return n&&(t=n.replace(/\]/g,"").split("["),r(e,t,a)),e},Object.create(null))},acfe.getFragment=function(e){e=/^\S+?(#[^\s\?]*)/.exec(e);return e?e[1]:""},acfe.getCurrentUrl=function(){return self.location.href},acfe.getCurrentPath=function(){return self.location.pathname},acfe.getCurrentFilename=function(){return acfe.getFilename(acfe.getCurrentPath())},acfe.getFilename=function(e){return e.split("/").pop()},i=function(e){let n="";const a=Object.entries(e);for(;o=a.shift();){let[e,t]=o;var i,r,o=Array.isArray(t)||t&&t.constructor===Object;if(o)for([i,r]of Object.entries(t).reverse())a.unshift([`${e}[${i}]`,r]);else void 0!==t&&(null===t&&(t=""),n+="&"+[e,t].map(encodeURIComponent).join("="))}return n.substr(1)},t=function(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t},r=function(n,a,i){var e=a.length,r=e-1;for(let t=0;tn[a]){r=1;break}}if(!t)return r;switch(t){case">":case"gt":return 0=":case"ge":return 0<=r;case"<=":case"le":return r<=0;case"===":case"=":case"eq":return 0===r;case"<>":case"!==":case"ne":return 0!==r;case"":case"<":case"lt":return r<0;default:return null}});